<%-- 
    Document   : searchPage
    Created on : May 7, 2013, 8:59:07 PM
    Author     : DIEM PHUONG
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@include file="/WEB-INF/header.jsp" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <div style="position: absolute; top: 125; left: 200; filter: mask(color=blue)">
            <h1 style="font-family: Courier, monospace">Search Result
            </h1>
        </div>
        <img src="Pictures/New2.jpg" width="1280" height="200"/>
        <ul class="products-grid first odd">
            <c:set var="searchResult" value="${requestScope.searchResult}"/>
            <c:choose>
                <c:when test="${not empty searchResult}">
                    <c:forEach var="list" items="${searchResult}">
                        <form method="GET" action="Controller">
                            <li>

                                <div class="productID" style="display:none">${list.productID}
                                </div>
                                <div class="productName" style="display:none">${list.productName}
                                </div>
                                <div class="productPrice" style="display:none">${list.price}
                                </div>

                                <a href="#" title="${list.productName}" class="product-image">


                                    <img onclick="viewDetail(this)" alt="${list.productName}" style="margin-left: -40px;" src="Pictures/${list.productImg}" />

                                </a>
                                <h2 class="product-name">
                                    <a href="#" title="${list.productName}" >
                                        ${list.productName}
                                    </a>
                                </h2>
                                <div>
                                    <span><em>$</em>
                                        ${list.price}
                                    </span>
                                </div>
                                <div>
                                    <button type="button" title="Add to Cart" onclick="addCart(this)">
                                        <span>
                                            <span>Add to Cart</span>
                                        </span>
                                    </button>
                                </div>
                            </li>
                        </form>
                    </c:forEach>
                </c:when>
                <c:otherwise>
                    <label>THERE IS NO RESULT FOR THIS KEYWORD!</label>
                </c:otherwise>
            </c:choose>

        </ul>
    </body>
</html>
